/* 系统管理界面样式 */
.container {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.sidebar {
    width: var(--sidebar-width);
    background-color: #2c3e50;
    color: white;
    padding: 20px 0;
    flex-shrink: 0;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
}

.admin-info {
    padding: 0 20px 20px;
    border-bottom: 1px solid #34495e;
    margin-bottom: 20px;
}

.admin-info h3 {
    font-size: 16px;
    font-weight: normal;
}

.menu-title {
    padding: 0 20px 10px;
    font-size: 14px;
    color: #95a5a6;
}

.menu {
    list-style: none;
}

.menu li {
    padding: 12px 20px;
    cursor: pointer;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* 首页菜单项靠左对齐 */
.menu li[data-target="home"] {
    padding-left: 10px;
}

.menu li i {
    margin-right: 10px;
    font-size: 16px;
}

.menu li .toggle-icon {
    margin-right: 0;
    margin-left: auto;
    font-size: 12px;
    transition: transform 0.3s;
}

.menu li:hover {
    background-color: #34495e;
}

.menu li.active {
    background-color: #3498db;
    border-left: 3px solid #2980b9;
}

.content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background-color: #f9f9f9;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.content-header h2 {
    font-size: 24px;
    color: #2c3e50;
    font-weight: 600;
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info {
    color: var(--gray-color);
    font-size: 14px;
}

.btn-logout {
    padding: 8px 15px;
    background-color: var(--danger-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.btn-logout:hover {
    background-color: #c82333;
}

.description {
    background-color: #e8f4fc;
    padding: 12px 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #2c3e50;
    border-left: 4px solid var(--primary-color);
}

.actions {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: center;
}

/* 统一按钮样式 - 确保所有按钮大小一致 */
.actions .btn,
.actions .btn-primary,
.actions button {
    min-height: 36px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.actions .btn-primary,
.actions button.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.actions .btn-primary:hover,
.actions button.btn-primary:hover {
    background-color: #1a6b96;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(35, 133, 187, 0.3);
}

.actions .btn,
.actions button:not(.btn-primary) {
    background-color: #f8f9fa;
    color: #495057;
    border: 1px solid #dee2e6;
}

.actions .btn:hover,
.actions button:not(.btn-primary):hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
}

.actions button i {
    font-size: 14px;
}

.search-area {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.search-area input {
    min-height: 36px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 200px;
    font-size: 14px;
}

.search-area input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(35, 133, 187, 0.1);
}

.search-area button {
    min-height: 36px;
    padding: 8px 16px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s;
}

.search-area button:hover {
    background-color: #1a6b96;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(35, 133, 187, 0.3);
}

.search-area button i {
    font-size: 14px;
}

.submenu {
    margin-left: 10px;
    margin-top: 5px;
    border-left: 1px solid #34495e;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.submenu.show {
    max-height: 500px;
}

.submenu-item {
    padding: 10px 15px 10px 30px;
    margin-bottom: 2px;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.submenu-item:hover, .submenu-item.active {
    background-color: var(--secondary-color);
    color: white;
}

.tab-container {
    display: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.tab-container.active {
    display: flex;
    flex-direction: column;
    opacity: 1;
    visibility: visible;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
    }
    
    .content {
        padding: 15px;
    }
    
    .content-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .header-right {
        width: 100%;
        justify-content: space-between;
    }
    
    .actions {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .search-area {
        margin-left: 0;
        width: 100%;
        margin-top: 10px;
    }
    
    .search-area input {
        flex: 1;
        width: 100%;
    }
}

/* 颜色徽章样式 - 用于标签管理模块 */
.color-badge {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
    border: 2px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* 统一表格操作按钮样式 */
.operation a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    margin-right: 8px;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 13px;
    border-radius: 4px;
    transition: all 0.2s;
}

.operation a:hover {
    background-color: rgba(35, 133, 187, 0.1);
    text-decoration: none;
}

.operation a i {
    font-size: 13px;
}

/* 标签样式统一 */
.tag {
    display: inline-block;
    padding: 4px 10px;
    background-color: #e3f2fd;
    color: #1976d2;
    border-radius: 12px;
    font-size: 12px;
    margin-right: 4px;
    margin-bottom: 2px;
    font-weight: 500;
}

/* 状态按钮样式增强 */
.status-btn {
    min-height: 26px;
    padding: 4px 12px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.2s;
}

.status-btn.active {
    background-color: #28a745;
    color: white;
}

.status-btn.active:hover {
    background-color: #218838;
    transform: scale(1.05);
}

.status-btn:not(.active) {
    background-color: #6c757d;
    color: white;
}

.status-btn:not(.active):hover {
    background-color: #5a6268;
    transform: scale(1.05);
}

/* 统一分页按钮样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    gap: 8px;
}

.pagination a,
.pagination button {
    min-height: 36px;
    min-width: 36px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #495057;
    background-color: white;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.pagination a:hover,
.pagination button:hover {
    background-color: #f8f9fa;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.pagination a.active,
.pagination button.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination a.active:hover,
.pagination button.active:hover {
    background-color: #1a6b96;
}

.pagination a:disabled,
.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 表格复选框样式 */
table input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

/* 表格容器滚动支持 */
.table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* 表格样式增强 */
.table-container table {
    min-width: 100%;
    table-layout: auto;
}

.table-container th {
    position: sticky;
    top: 0;
    background-color: #f8f9fa;
    z-index: 10;
}

/* 确保表格单元格内容不换行 */
.table-container th {
    white-space: nowrap;
}

/* 表格内容单元格处理 */
.table-container td {
    max-width: 300px;
}

/* 表格标题列宽度控制 - 防止标题过长 */
.table-container th:first-child,
.table-container td:first-child {
    width: 50px;
    text-align: center;
    padding: 12px 8px;
}

/* 操作列固定宽度 */
.table-container th:last-child,
.table-container td:last-child {
    width: 200px;
    white-space: nowrap;
}

/* 状态列固定宽度 */
.table-container td .status-btn {
    white-space: nowrap;
}

/* 表格行悬停效果 */
.table-container tbody tr {
    transition: background-color 0.2s;
}

.table-container tbody tr:hover {
    background-color: #f8f9fa;
}

/* 滚动条样式 */
.table-container::-webkit-scrollbar {
    height: 8px;
}

.table-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* ========== 首页样式 ========== */
.home-container {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.home-welcome {
    text-align: center;
    max-width: 900px;
    width: 100%;
}

.welcome-icon {
    margin-bottom: 30px;
}

.welcome-icon i {
    font-size: 80px;
    color: var(--primary-color);
    opacity: 0.9;
}

.home-welcome h1 {
    font-size: 32px;
    color: #2c3e50;
    margin-bottom: 20px;
    font-weight: 600;
}

.welcome-text {
    font-size: 16px;
    color: #6c757d;
    line-height: 1.8;
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* 统计卡片 */
.home-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 30px 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon i {
    font-size: 28px;
    color: white;
}

.stat-content {
    text-align: center;
}

.stat-content h3 {
    font-size: 36px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 5px 0;
}

.stat-content p {
    font-size: 14px;
    color: #6c757d;
    margin: 0;
}

/* 首页操作按钮 */
.home-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.home-btn {
    min-height: 48px;
    padding: 12px 32px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
}

.home-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.home-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.home-btn-primary i {
    font-size: 18px;
}

/* 首页响应式 */
@media (max-width: 768px) {
    .home-welcome h1 {
        font-size: 24px;
    }

    .welcome-text {
        font-size: 14px;
    }

    .welcome-icon i {
        font-size: 60px;
    }

    .home-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .stat-card {
        padding: 20px 15px;
    }

    .stat-content h3 {
        font-size: 28px;
    }

    .stat-icon {
        width: 50px;
        height: 50px;
    }

    .stat-icon i {
        font-size: 24px;
    }

    .home-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .home-stats {
        grid-template-columns: 1fr;
    }
}

/* 响应式表格处理 */
@media (max-width: 1200px) {
    .table-container {
        overflow-x: scroll;
    }

    .table-container table {
        min-width: 900px;
    }
}

@media (max-width: 768px) {
    .table-container th,
    .table-container td {
        padding: 10px 8px;
        font-size: 13px;
    }

    .table-container table {
        min-width: 800px;
    }

    /* 移动端操作按钮调整 */
    .operation a {
        padding: 4px 6px;
        font-size: 12px;
    }
}